package com.zzz.demo.interf.impl;

import com.zzz.demo.interf.AsyncTaskListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author ZZZ
 * @version 1.0
 * @date 2018/7/05 0005
 */
public abstract class AsyncTaskAdapter implements AsyncTaskListener {

    /**
     * Logger for this class
     */
    private static final Logger logger = LoggerFactory.getLogger(AsyncTaskAdapter.class);


    @Override
    public void onStart() {
        if(logger.isInfoEnabled()){
            logger.info("异步任务开始执行..........");
        }
    }

    @Override
    public void onSuccess() {
        if(logger.isInfoEnabled()){
            logger.info("异步任务执行成功..........");
        }
    }

    @Override
    public void onFailed() {
        if(logger.isErrorEnabled()){
            logger.error("异步任务执行失败..........");
        }
    }
}
